import requests

class login_API:

    def __init__(self):
        self.session = requests.session()
        self.code_url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify&r=0.9897303367720098"
        self.login_url="http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=do_login&t=0.6625487913526225"
    def get_code(self):
        return self.session.get(url=self.code_url)
    def login(self,login_data):
        return self.session.post(url=self.login_url,data=login_data)
